﻿using System.ServiceProcess;
using System.Windows.Forms;
namespace FileMonitor.Service
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        internal static bool isRunAtService = true;
        private static Form1 testForm;
        static void Main(string[] args)
        {
            if (args == null || args.Length == 0)
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[] 
			{ 
				new Service() 
			};
                ServiceBase.Run(ServicesToRun);

            }
            else if (args[0] == "-c")
            {
                isRunAtService = false;
                testForm = new Form1();
                Application.EnableVisualStyles();
                Application.Run(testForm);
            }
        }
    }
}
